/************************************************************************************
**                                                                                 **
**                               mcHF QRP Transceiver                              **
**                             K Atanassov - M0NKA 2014                            **
**                                                                                 **
**---------------------------------------------------------------------------------**
**                                                                                 **
**  File name:                                                                     **
**  Description:                                                                   **
**  Last Modified:                                                                 **
**  Licence:		For radio amateurs experimentation, non-commercial use only!   **
************************************************************************************/

#ifndef __Q_RX_FILTER_H
#define __Q_RX_FILTER_H

#define Q_BLOCK_SIZE		1
#define Q_NUM_TAPS			89

/*
     * Kaiser Window FIR Filter
     *
     * Filter type: Q-filter
     * Passband: 0.0 - 1350.0 Hz
     * modulation freq: 1650Hz
     *  with +90 degree pahse shift
     * Order: 88
     * Transition band: 500.0 Hz
     * Stopband attenuation: 60.0 dB
     */
const float q_rx_coeffs[Q_NUM_TAPS] =
{
      	6.767926E-5f,
      	-2.1822347E-4f,
      	-3.3091355E-4f,
      	1.1819744E-4f,
      	2.1773627E-9f,
      	-8.6602167E-4f,
      	-5.9300865E-4f,
      	3.814961E-4f,
      	-6.342388E-4f,
      	-0.00205537f,
      	-5.616135E-4f,
      	4.8721067E-4f,
      	-0.002414588f,
      	-0.003538588f,
      	-2.7166707E-9f,
      	-3.665928E-4f,
      	-0.0057645175f,
      	-0.004647882f,
      	8.681589E-4f,
      	-0.0034366683f,
      	-0.010545009f,
      	-0.0045342376f,
      	9.309649E-4f,
      	-0.01009504f,
      	-0.015788108f,
      	-0.0027427748f,
      	-0.0020795742f,
      	-0.021347176f,
      	-0.019808702f,
      	-4.1785704E-9f,
      	-0.011752444f,
      	-0.037658f,
      	-0.020762002f,
      	8.017756E-4f,
      	-0.03406628f,
      	-0.060129803f,
      	-0.01745214f,
      	-0.008082453f,
      	-0.08563026f,
      	-0.09845453f,
      	-0.010001372f,
      	-0.06433928f,
      	-0.31072536f,
      	-0.35893586f,
      	0.0f,
      	0.35893586f,
      	0.31072536f,
      	0.06433928f,
      	0.010001372f,
      	0.09845453f,
      	0.08563026f,
      	0.008082453f,
      	0.01745214f,
      	0.060129803f,
      	0.03406628f,
      	-8.017756E-4f,
      	0.020762002f,
      	0.037658f,
      	0.011752444f,
      	4.1785704E-9f,
      	0.019808702f,
      	0.021347176f,
      	0.0020795742f,
      	0.0027427748f,
      	0.015788108f,
      	0.01009504f,
      	-9.309649E-4f,
      	0.0045342376f,
      	0.010545009f,
      	0.0034366683f,
      	-8.681589E-4f,
      	0.004647882f,
      	0.0057645175f,
      	3.665928E-4f,
      	2.7166707E-9f,
      	0.003538588f,
      	0.002414588f,
      	-4.8721067E-4f,
      	5.616135E-4f,
      	0.00205537f,
      	6.342388E-4f,
      	-3.814961E-4f,
      	5.9300865E-4f,
      	8.6602167E-4f,
      	-2.1773627E-9f,
      	-1.1819744E-4f,
      	3.3091355E-4f,
      	2.1822347E-4f,
      	-6.767926E-5f
};

static float32_t 		FirState_Q[128];
arm_fir_instance_f32 	FIR_Q;

#endif
